<template lang="">
    <div>
                    <!-- 面包屑导航 -->
         <el-bread></el-bread>
  <!-- 添加按钮 -->
     <el-button type="primary" plain class="add" size="small" @click="addlogin">添加</el-button>

     <v-list @edit="edit"></v-list>

     <v-Dialog ref="reference" @cancel="cancel" :isShow = "isShow" :isAdd = "isAdd"></v-Dialog>
    </div>
    </div>
</template>
<script>
import vList from './list.vue'
import vDialog from './dialog.vue'
export default {
    data() {
        return {
            isShow:false,
            isAdd:false
        }
    },
    components:{
        vList,
        vDialog
    },
    methods: {
        addlogin(){
            this.isShow = true,
              //告诉弹框你是新增
            this.isAdd = true
        },
        cancel(e){
             this.isShow = e
        },
        edit(e){
            // 打开弹窗
            this.isShow = true
            //告诉弹框你是编辑
            this.isAdd = false
            this.$refs.reference.lookup(e)
        }
    },
}
</script>
<style lang="less" scoped>
.add {
    margin-top: 20px;
}
</style>